import { putAction, postAction } from '@/api/manage'
import { serviceApi } from '@/api/common.js'
/**
 * 公共API接口
 */
export const api = {
  list: serviceApi.auth + '/apps', // 应用列表
  myList: (appOrgId) => serviceApi.auth + `/apps/tenants/${appOrgId}`, // 我的应用
  delete: (ids) => serviceApi.auth + `/apps/${ids}` // 应用删除
}

/**
 * 添加应用
 * @param {*} params
 * @returns
 */
export const addApp = params => postAction(serviceApi.auth + '/apps', params)

/**
 * 编辑应用
 * @param {*} params
 * @returns
 */
export const editApp = params => putAction(serviceApi.auth + '/apps', params)
